<script>
export default {
  name: "Options",
  /*以下的写法是optionsAPI的写法*/
  data() {
    return {
      count: 1
    }
  },
  methods: {
    handleAdd() {
      this.count++
    }
  },
  computed: {
    maxCount() {
      return this.count * 2
    }
  }
}
</script>

<template>
    <button @click="handleAdd">{{ count }}-{{ maxCount }}</button>
</template>
